Skip to main content

Assign a Task

Overview

Sometimes, business requirements demand that the same user is assigned to several tasks, which occur in parallel in a process. For this specific business requirement, Bizagi offers two functions that return the assigned user's ID based on given criteria. Keep in mind that these functions do not directly assign the task; this would have to be done manually by relying on the use of these functions, as described below.

Methods

  1. To get the next assigned user by load, use the following method:

    CHelper.LoadAssig(AssigneeList, Me)
    • Attributes:
      • AssigneeList: List of users to select the assignee.
      • Me: This parameter is fixed.
  2. To get the next assigned user by sequence, use the following method:

    CHelper.SecuentialAssig(AssigneeList, Me)
    • Attributes:
      • AssigneeList: List of users to select the assignee.
      • Me: This parameter is fixed.

Example

Suppose that for our organization's Travel Request process, we need the same Administrative Assistant that registers the bookings to manage the travel advance. This person will know the traveler's hotel privileges, location, and meals included to calculate the best amount for the advance.

assignTask01

To select a user by load, use the following expression: assignTask01 The expression shown above is as follows:

var userList = CHelper.getUsersForRole("AdministrativeAssistant");
var idAssignedUser = CHelper.LoadAssig(userList, Me);
<TravelRequest.idAdministrationAssistant> = idAssignedUser;

Otherwise, if you wish to select the user using a sequence, use the following expression:

assignTask02 The expression shown above is as follows:

var userList = CHelper.getUsersForRole("AdministrativeAssistant");
var idAssignedUser = CHelper.SecuentialAssig(userList, Me);
<TravelRequest.idAdministrationAssistant> = idAssignedUser;

Finally, when configuring performers, make sure that the selected user is assigned the activities by using this setup:

assignTask04